

<%@page import="java.util.List"%>
<%@page import="entities.Users"%>
<%@page import="java.util.Iterator"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" type="text/css" href="style/table.css" media="all">
    </head>
    <body>



        <% List<Users> listuser = (List<Users>) request.getAttribute("list_user");%>
        <% Users user;%>
        <% Iterator<Users> iterator = listuser.iterator();%>
        <% String username = (String) session.getAttribute("username");%>

        <table id="rounded-corner">
            <thead>
                <tr>
                    <th colspan="4">
                        <a href="login.jsp">Login</a>
                        <% if (!username.equals("")) {%>
                        <a href="home">Home</a>
                        <% ;
                           }%>
                    </th>
                </tr> 
                <tr>
                    <th width="187" class="" scope="col">Nama Lengkap</th>
                    <th width="232" class="" scope="col">Username</th> 
                    <th width="20" class="" scope="col"></th> 
                    <th width="20" class="" scope="col"></th> 
                </tr>
            </thead>
            <tbody>
                <% while (iterator.hasNext()) {
                        user = iterator.next();%>
                <tr>
                    <td><%=user.getNama()%></td>
                    <td><%=user.getUsername()%></td>   
                    <td><a href="EditUser?user=<%=user.getId()%>">edit</a></td> 
                    <td><a href="ProsesDeleteUser?user=<%=user.getId()%>">delete</a></td> 
                </tr>
                <%}%>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="4"><em><a href="signup">Tambah User</a></em></td>
                </tr>                
            </tfoot>
        </table>           
    </body>
</html>
